using Framework.Core.Process;
using Framework.Core.Process.Tasks;
using Xunit;

namespace Framework.Tests.Core.Process
{
    public class ProcessStateTest
    {
        [Fact]
        public void Should_display_command()
        {
            var command = new Command("filename", "args");

            Assert.Equal("c: filename args", command.ToString());
            Assert.True(command.IsNative);
        }

        [Fact]
        public void Should_display_process()
        {
            var processState = new Framework.Core.Process.Process(0, "name", "filename", "args", false);

            Assert.Equal("p: name args (0)", processState.ToString());
        }

        [Fact]
        public void Should_display_windows_service_state()
        {
            var processState = new WindowsService(0, "name","name", "");

            Assert.Equal("ws: name (0)", processState.ToString());
        }
    }
}